package com.hontech.kaltaapp.app

import com.hontech.kaltaapp.store.Store
import com.hontech.kaltaapp.ui.dialog.showErr
import com.hontech.kaltaapp.utils.writePermissionCheck

object Init {

    private var flag = false


    suspend fun init() {
        if (flag) {
            return
        }
        flag = true

        try {
            permissionInit()
            Store.init()
        } catch (e: Exception) {
            e.printStackTrace()
            showErr("错误", e)
        }
    }


    private suspend fun permissionInit() {
        writePermissionCheck()
    }

}